package com.ruoyi.system.service.estate.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.estate.BuildingMapper;
import com.ruoyi.system.domain.estate.Building;
import com.ruoyi.system.service.estate.IBuildingService;

/**
 * 楼宇管理Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class BuildingServiceImpl implements IBuildingService 
{
    @Autowired
    private BuildingMapper buildingMapper;

    /**
     * 查询楼宇信息
     * 
     * @param buildingId 楼宇ID
     * @return 楼宇信息
     */
    @Override
    public Building selectBuildingById(Long buildingId)
    {
        return buildingMapper.selectBuildingById(buildingId);
    }

    /**
     * 查询楼宇列表
     * 
     * @param building 楼宇信息
     * @return 楼宇
     */
    @Override
    public List<Building> selectBuildingList(Building building)
    {
        return buildingMapper.selectBuildingList(building);
    }

    /**
     * 新增楼宇
     * 
     * @param building 楼宇信息
     * @return 结果
     */
    @Override
    public int insertBuilding(Building building)
    {
        building.setDelFlag("0");
        return buildingMapper.insertBuilding(building);
    }

    /**
     * 修改楼宇
     * 
     * @param building 楼宇信息
     * @return 结果
     */
    @Override
    public int updateBuilding(Building building)
    {
        return buildingMapper.updateBuilding(building);
    }

    /**
     * 批量删除楼宇
     * 
     * @param buildingIds 需要删除的楼宇ID
     * @return 结果
     */
    @Override
    public int deleteBuildingByIds(Long[] buildingIds)
    {
        return buildingMapper.deleteBuildingByIds(buildingIds);
    }

    /**
     * 删除楼宇信息
     * 
     * @param buildingId 楼宇ID
     * @return 结果
     */
    @Override
    public int deleteBuildingById(Long buildingId)
    {
        return buildingMapper.deleteBuildingById(buildingId);
    }
} 